package com.gotloop.controllers;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * Main controller for simple pages.
 * @author jibhaine
 *
 */
@Controller
public class MainController {

	/**
	 * Logger for MainController.
	 */
	private static final Logger LOG = LoggerFactory.getLogger(MainController.class);
	
	/**
	 * Site home page.
	 * @return loopList view and a list of latest loops.
	 */
    @RequestMapping(value = { "/" })
	public ModelAndView showHomePage() {
    	LOG.debug("showHomePage");
    	return new ModelAndView("loopList");
    }
    

	/**
	 * About page.
	 * @return about view
	 */
    @RequestMapping(value = { "/about" })
	public ModelAndView showAboutPage() {
    	LOG.debug("showAboutPage");
    	return new ModelAndView("about");
    }
    

	/**
	 * Tags page.
	 * @return tags view
	 */
    @RequestMapping(value = { "/tags" })
	public ModelAndView showTagsPage() {
    	LOG.debug("showTagsPage");
    	return new ModelAndView("tags");
    }
}
